class VideoController {
    static async getShareToken(req, res) {
        try {
            // 从环境变量获取 shareToken
            const shareToken = process.env.VIDEO_SHARE_TOKEN;

            if (!shareToken) {
                throw new Error('Video share token not configured');
            }

            res.json({
                code: 200,
                message: '获取shareToken成功',
                data: {
                    shareToken
                }
            });
        } catch (error) {
            console.error('获取shareToken错误:', error);
            res.status(500).json({ 
                code: 500,
                message: '获取shareToken失败',
                error: error.message 
            });
        }
    }

    // 添加获取语音助手 shareToken 的方法
    static async getVoiceShareToken(req, res) {
        try {
            // 从环境变量获取语音助手 shareToken
            const shareToken = process.env.VOICE_SHARE_TOKEN;

            if (!shareToken) {
                throw new Error('Voice share token not configured');
            }

            res.json({
                code: 200,
                message: '获取语音助手shareToken成功',
                data: {
                    shareToken
                }
            });
        } catch (error) {
            console.error('获取语音助手shareToken错误:', error);
            res.status(500).json({ 
                code: 500,
                message: '获取语音助手shareToken失败',
                error: error.message 
            });
        }
    }
}

module.exports = VideoController; 